<?php
    $variable = "jajajajaja";
    echo '  <mio>
                <tag1>Valor</tag1>
                <tag2>Valor2</tag2>
            </mio>';
    echo str_replace("'","''",$variable);
?>